﻿/**********
 * Owner: Shared
 **********/
using System;

namespace Rage.Marauder
{
    public static class HelperFunctions
    {
    }

    public static class TalentsAsSpecialEffects
    {
        // We need these to be static so they aren't re-created 50 bajillion times

        #region Static Lists, ones that don't need special handling
        #region Drums of War
        public static float[] DrumsOfWarRageCosts = new float[] { 10, 5, -1 };
        #endregion
        #region Bloodsurge
        public static SpecialEffect[] Bloodsurge = {
            null,
            new SpecialEffect(Trigger.MortalStrikeHit, null, 10, 3, 0.10f * 1f),
            new SpecialEffect(Trigger.MortalStrikeHit, null, 10, 3, 0.10f * 2f),
            new SpecialEffect(Trigger.MortalStrikeHit, null, 10, 3, 0.10f * 3f),
        };
        #endregion
        #region Incite
        public static SpecialEffect[] Incite = new SpecialEffect[] {
            null,
            new SpecialEffect(Trigger.HSorSLHit, null, 0, 6, 1f / 3f * 1f), // actual trigger is HS Crit but no need to make one
            new SpecialEffect(Trigger.HSorSLHit, null, 0, 6, 1f / 3f * 2f),
            new SpecialEffect(Trigger.HSorSLHit, null, 0, 6, 1f / 3f * 3f),
        };
        #endregion
        #region Battle Shout (Booming Voice & Glyph of Battle)
        /// <summary>2d Array,  Glyph of Battle 0-1, Booming Voice 0-2, Cata no longer has Comm Presence</summary>
        public static SpecialEffect[/*Glyph:0-1*/][/*boomVoice:0-2*/] BattleShout = {
            new SpecialEffect[] { new SpecialEffect(Trigger.Use, new Stats() { Strength = 549f, Cunning = 549f, }, ((2f + (false ? 2f : 0f)) * 60f * (1f + 0 * 0.25f)), ((2f + (false ? 2f : 0f)) * 60f * (1f + 0 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Strength = 549f, Cunning = 549f, }, ((2f + (false ? 2f : 0f)) * 60f * (1f + 1 * 0.25f)), ((2f + (false ? 2f : 0f)) * 60f * (1f + 1 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Strength = 549f, Cunning = 549f, }, ((2f + (false ? 2f : 0f)) * 60f * (1f + 2 * 0.25f)), ((2f + (false ? 2f : 0f)) * 60f * (1f + 2 * 0.25f))) },
            new SpecialEffect[] { new SpecialEffect(Trigger.Use, new Stats() { Strength = 549f, Cunning = 549f, }, ((2f + (true  ? 2f : 0f)) * 60f * (1f + 0 * 0.25f)), ((2f + (true  ? 2f : 0f)) * 60f * (1f + 0 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Strength = 549f, Cunning = 549f, }, ((2f + (true  ? 2f : 0f)) * 60f * (1f + 1 * 0.25f)), ((2f + (true  ? 2f : 0f)) * 60f * (1f + 1 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Strength = 549f, Cunning = 549f, }, ((2f + (true  ? 2f : 0f)) * 60f * (1f + 2 * 0.25f)), ((2f + (true  ? 2f : 0f)) * 60f * (1f + 2 * 0.25f))) },
        };
        #endregion
        #region Commanding Shout (Booming Voice & Glyph of Command)
        /// <summary>2d Array, Glyph of Command 0-1, Booming Voice 0-2, Cata no longer has Comm Presence</summary>
        public static SpecialEffect[/*Glyph:0-1*/][/*boomVoice:0-2*/] CommandingShout = {
            new SpecialEffect[] { new SpecialEffect(Trigger.Use, new Stats() { Endurance = 584f, }, ((2f + (false ? 2f : 0f)) * 60f * (1f + 0 * 0.25f)), ((2f + (false ? 2f : 0f)) * 60f * (1f + 0 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Endurance = 584f, }, ((2f + (false ? 2f : 0f)) * 60f * (1f + 1 * 0.25f)), ((2f + (false ? 2f : 0f)) * 60f * (1f + 1 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Endurance = 584f, }, ((2f + (false ? 2f : 0f)) * 60f * (1f + 2 * 0.25f)), ((2f + (false ? 2f : 0f)) * 60f * (1f + 2 * 0.25f))) },
            new SpecialEffect[] { new SpecialEffect(Trigger.Use, new Stats() { Endurance = 584f, }, ((2f + (true  ? 2f : 0f)) * 60f * (1f + 0 * 0.25f)), ((2f + (true  ? 2f : 0f)) * 60f * (1f + 0 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Endurance = 584f, }, ((2f + (true  ? 2f : 0f)) * 60f * (1f + 1 * 0.25f)), ((2f + (true  ? 2f : 0f)) * 60f * (1f + 1 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Endurance = 584f, }, ((2f + (true  ? 2f : 0f)) * 60f * (1f + 2 * 0.25f)), ((2f + (true  ? 2f : 0f)) * 60f * (1f + 2 * 0.25f))) },
        };
        #endregion
        #region Rallying Cry// (Booming Voice & Glyph of Command)
        /// <summary>2d Array, Glyph of Command 0-1, Booming Voice 0-2, Cata no longer has Comm Presence</summary>
        public static SpecialEffect RallyingCry = new SpecialEffect(Trigger.Use, new Stats() { BonusHealthMultiplier = 0.20f, }, 10f, 3f * 60f);
        /*public static SpecialEffect[/*Glyph:0-1*//*][/*boomVoice:0-2*//*] CommandingShout = {
            new SpecialEffect[] { new SpecialEffect(Trigger.Use, new Stats() { Stamina = 584f, }, ((2f + (false ? 2f : 0f)) * 60f * (1f + 0 * 0.25f)), ((2f + (false ? 2f : 0f)) * 60f * (1f + 0 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Stamina = 584f, }, ((2f + (false ? 2f : 0f)) * 60f * (1f + 1 * 0.25f)), ((2f + (false ? 2f : 0f)) * 60f * (1f + 1 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Stamina = 584f, }, ((2f + (false ? 2f : 0f)) * 60f * (1f + 2 * 0.25f)), ((2f + (false ? 2f : 0f)) * 60f * (1f + 2 * 0.25f))) },
            new SpecialEffect[] { new SpecialEffect(Trigger.Use, new Stats() { Stamina = 584f, }, ((2f + (true  ? 2f : 0f)) * 60f * (1f + 0 * 0.25f)), ((2f + (true  ? 2f : 0f)) * 60f * (1f + 0 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Stamina = 584f, }, ((2f + (true  ? 2f : 0f)) * 60f * (1f + 1 * 0.25f)), ((2f + (true  ? 2f : 0f)) * 60f * (1f + 1 * 0.25f))),
                                  new SpecialEffect(Trigger.Use, new Stats() { Stamina = 584f, }, ((2f + (true  ? 2f : 0f)) * 60f * (1f + 2 * 0.25f)), ((2f + (true  ? 2f : 0f)) * 60f * (1f + 2 * 0.25f))) },
        };*/
        #endregion
        #region Demoralizing Shout
        public static SpecialEffect[/*Glyph of Demoralizing Shout*/] DemoralizingShout = {
            new SpecialEffect(Trigger.Use, new Stats() { BossPhysicalDamageDealtReductionMultiplier = 0.10f, }, 30f + (false ? 15f : 0f), 1.5f),
            new SpecialEffect(Trigger.Use, new Stats() { BossPhysicalDamageDealtReductionMultiplier = 0.10f, }, 30f + (true  ? 15f : 0f), 1.5f),
        };
        #endregion
        #region Recklessness, Shattering Throw, ThunderClap, Sunder Armor, Sweeping Strikes
        public static SpecialEffect[] _SE_Recklessness = new SpecialEffect[] {
            //new SpecialEffect(Trigger.Use, new Stats() { PhysicalCrit = 0.50f, DamageTakenReductionMultiplier = -0.20f }, 12f, 5f * 60f * (1f - 0.10f * 0)),
            //new SpecialEffect(Trigger.Use, new Stats() { PhysicalCrit = 0.50f, DamageTakenReductionMultiplier = -0.20f }, 12f, 5f * 60f * (1f - 0.10f * 1)),
            //new SpecialEffect(Trigger.Use, new Stats() { PhysicalCrit = 0.50f, DamageTakenReductionMultiplier = -0.20f }, 12f, 5f * 60f * (1f - 0.10f * 2)),
        };
        //public static Dictionary<float, SpecialEffect> _SE_ShatteringThrow = new Dictionary<float, SpecialEffect>();
        //public static Dictionary<float, SpecialEffect> _SE_ThunderClap = new Dictionary<float, SpecialEffect>();
        //public static Dictionary<float, SpecialEffect> _SE_SunderArmor = new Dictionary<float, SpecialEffect>();
        //public static Dictionary<float, SpecialEffect> _SE_SweepingStrikes = new Dictionary<float, SpecialEffect>();
        #endregion
        #region Berserker Rage
        public static SpecialEffect BerserkerRage = new SpecialEffect(Trigger.Use, null, 10f, 30f);
        #endregion
        #region Battle Trance
        public static SpecialEffect[] BattleTrance = new SpecialEffect[] {
            null,
            new SpecialEffect(Trigger.Use, null, 0f, 0f, 0.05f * 1f),
            new SpecialEffect(Trigger.Use, null, 0f, 0f, 0.05f * 2f),
            new SpecialEffect(Trigger.Use, null, 0f, 0f, 0.05f * 3f),
        };
        #endregion
        #region Wrecking Crew
        public static SpecialEffect[] WreckingCrew = {
            null,
            new SpecialEffect(Trigger.MortalStrikeCrit, new Stats() { BonusDamageMultiplier = 1 * (0.10f/3f), }, 12, 0, 1f * (1f/3f)),
            new SpecialEffect(Trigger.MortalStrikeCrit, new Stats() { BonusDamageMultiplier = 2 * (0.10f/3f), }, 12, 0, 2f * (1f/3f)),
            new SpecialEffect(Trigger.MortalStrikeCrit, new Stats() { BonusDamageMultiplier = 3 * (0.10f/3f), }, 12, 0, 3f * (1f/3f)),
        };
        #endregion
        #region Blood Craze
        public static SpecialEffect[] BloodCraze = {
            null,
            new SpecialEffect(Trigger.DamageTaken, new Stats() { HealthRestoreFromMaxHealth = 0.01f * 1f, }, 0f, 0f, 0.10f),
            new SpecialEffect(Trigger.DamageTaken, new Stats() { HealthRestoreFromMaxHealth = 0.01f * 2f, }, 0f, 0f, 0.10f),
            new SpecialEffect(Trigger.DamageTaken, new Stats() { HealthRestoreFromMaxHealth = 0.01f * 3f, }, 0f, 0f, 0.10f),
        };
        #endregion
        #region Executioner
        public static SpecialEffect[] Executioner = {
            null,
            new SpecialEffect(Trigger.ExecuteHit, new Stats() { Alacrity = 0.05f, }, 9, 0, 0.50f * 1f, 5),
            new SpecialEffect(Trigger.ExecuteHit, new Stats() { Alacrity = 0.05f, }, 9, 0, 0.50f * 2f, 5),
        };
        #endregion

        public static SpecialEffect ColossusSmash = new SpecialEffect(Trigger.ColossusSmashHit, new Stats() { ArmorPenetration = 1.0f }, 6f, 0f);

        #endregion

        #region Functions that take in something to affect the SpecialEffect needing to be returned
        public static SpecialEffect GetDeathWishWithMastery(float masteryVal, Base.Abilities.CollectedCharacter dpswarrchar) {
            SpecialEffect retVal = new SpecialEffect(Trigger.Use,
                    new Stats() { BonusDamageMultiplier = 0.20f * (1f + masteryVal), DamageTakenReductionMultiplier = -0.05f, },
                    30f, 3f * 60f * (1f - 0.10f * (dpswarrchar.Talents as MarauderTalents).Annihilate));
            return retVal;
        }
        public static SpecialEffect GetEnragedRegenerationWithMastery(float masteryVal, Base.Abilities.CollectedCharacter dpswarrchar) {
            SpecialEffect retVal = new SpecialEffect(Trigger.MeleeHit,
                    new Stats() { BonusDamageMultiplier = 0.10f / 3f * (dpswarrchar.Talents as MarauderTalents).Annihilate * (1f + masteryVal), },
                    9f, 0f, 0.03f * 3f);
            return retVal;
        }
        #endregion
    }
}